﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TestAngular.Migrations
{
    public partial class Suppliers_SupplierType_UpdateParentId : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_BasicArchivesSupplierType_BasicArchivesSupplierType_SupplierTypeId",
                table: "BasicArchivesSupplierType");

            migrationBuilder.DropIndex(
                name: "IX_BasicArchivesSupplierType_SupplierTypeId",
                table: "BasicArchivesSupplierType");

            migrationBuilder.DropColumn(
                name: "SupplierTypeId",
                table: "BasicArchivesSupplierType");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "SupplierTypeId",
                table: "BasicArchivesSupplierType",
                type: "uniqueidentifier",
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_BasicArchivesSupplierType_SupplierTypeId",
                table: "BasicArchivesSupplierType",
                column: "SupplierTypeId");

            migrationBuilder.AddForeignKey(
                name: "FK_BasicArchivesSupplierType_BasicArchivesSupplierType_SupplierTypeId",
                table: "BasicArchivesSupplierType",
                column: "SupplierTypeId",
                principalTable: "BasicArchivesSupplierType",
                principalColumn: "Id");
        }
    }
}
